<?php
/**
 * Created by PhpStorm.
 * User: qhzhyt
 * Date: 2018/10/4
 * Time: 16:57
 */
require '../vendor/autoload.php';
use Monolog\Logger;
use Monolog\Handler\StreamHandler;

// 创建日志频道

$date = date('Y-m-d');

$log = new Logger('THMServer');

$log->pushHandler(new StreamHandler('../log/'.$date.'.log', Logger::DEBUG));

// 添加日志记录
# $log->addDebug('日志已添加');